home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install 1.394 (28-01-1994)
- ; Script to install PolyEd
-
- (complete 0)
-
- ;=============================================================================
- ; strings
-
- (set #bad-kick
- (cat "You must be using Kickstart 2.0 or higher to install PolyEd."
- ))
-
- (set #introduction
- (cat "\n\nThis program lets you install PolyEd on a hard drive (or where-ever you want)."
- ))
-
- (set #which-language
- (cat "\nWhich languages should be installed?"
- ))
-
- (set #which-iconset
- (cat "\nWhich icon set should be installed?"
- ))
-
-
- (set #which-language-help
- (cat "\nThe Amiga can be operated in many different "
- "languages. "
- "To reduce the amount of space consumed by the "
- "language files, you can select only the "
- "files of specific languages to be copied.\n\n"
- "Check the boxes of the languages you wish "
- "to have available on your system.\n\n"
- @askoptions-help
- ))
-
- (set #which-iconset-help
- (cat "\nThis package provides two sets of icons, one for standard workbench and "
- "one for the 'MagicWB'. Select the set you want to use.\n"
- @askchoice-help
- ))
-
- (set #startup-help
- (cat "\nAn assign to the PolyEd drawer called PED: "
- "and the inclusion of that assign to the "
- "paths where AmigaOS looks for programs is "
- "being added to the user-startup"
- ))
-
- (set #pretend-iconcopy
- (cat "\nNow I would copy icons of the selected set "
- "for all files in the Doc, Rexx and Macro drawers."
- ))
-
- ;=============================================================================
- ; make sure we are running under V37+
-
- (set osversion (/ (getversion) 65536))
- (if (< osversion 37)
- (
- (abort #bad-kick)
- ))
-
- ;=============================================================================
- ; say hi!
-
- ;(set old_level @user-level) ; remember user-level
- ;(user 2) ; for message is shown
- ;(message #introduction) ; show intro message
-
- ;(user old_level) ; revert to original user-level
-
- ;(welcome)
-
- ;=============================================================================
- ; get target
-
- (set old_level @user-level) ; remember user-level
- (user 2)
-
- (set target (askdir (prompt "Where do you want the PolyEd drawer to be placed in?")
- (help @askdir-help)
- (default "SYS:Tools")
- )
- )
- (user old_level)
- (set @default-dest target)
-
- ;=============================================================================
- ; which languages should be installed?
-
- (user 2)
- (set lang (askoptions (prompt #which-language)
- (help #which-language-help)
- (choices
- ; "Dansk"
- "Deutsch"
- "English"
- ; "Español"
- ; "Français"
- ; "Italiano"
- ; "Nederlands"
- ; "Norsk"
- ; "Português"
- "Svenska"
- )
- (default -1)
- )
- )
- (user old_level)
-
- ;=============================================================================
- ; which icon set should be installed (Standard or MagicWB)
-
- (set iconset (askchoice (prompt #which-iconset)
- (help #which-iconset-help)
- (choices "Standard" "MagicWB")
- )
- )
-
- ;=============================================================================
- ; Copy required libraries for V37
-
- (if (= osversion 37)
- (
- (working "Installing libraries to Libs:")
- (copylib
- (help #v37needslibs)
- (source "reqtools.library")
- (dest "LIBS:")
- )
-
- (copylib
- (help #v37needslibs)
- (source "amigaguide.library")
- (dest "LIBS:")
- )
- ))
- (complete 10)
- ;=============================================================================
- ; make some drawers
-
- (set supertarget target)
- (set target (tackon target "PolyEd"))
- (makedir target (infos) (prompt "Creating some drawers..."))
- (makedir (tackon target "Doc"))
- (makedir (tackon target "Icons"))
-
- ;=============================================================================
- ; copy main-program
-
- (copyfiles (prompt "")
- (help @copyfiles-help)
- (source "ped")
- (dest target)
- )
- (complete 40)
-
- (copyfiles (prompt "")
- (help @copyfiles-help)
- (source "Read.Me")
- (dest target)
- )
- (complete 45)
-
- ;=============================================================================
- ; copy catalogs and documentation
- (working "Installing Documentation and catalogs")
- (copyfiles (optional nofail)
- (source "Doc")
- (dest (tackon target "Doc"))
- (pattern "arexx.#?")
- )
-
- (set n 0)
- (while (set language (select n
- ; "Dansk"
- "Deutsch"
- "English"
- ; "Español"
- ; "Français"
- ; "Italiano"
- ; "Nederlands"
- ; "Norsk"
- ; "Português"
- "Svenska"
- ""
- )
- )
- (
- (if (IN lang n)
- (
- (if (<> 1 n) ; FIXME: Wenn Dansk verfügbar, 1 auf 2 ändern (entspricht englisch, das als Default keinen Catalog hat!)
- (
- (makedir (tackon target "Catalogs"))
- (set catalog-dir (tackon target (cat "Catalogs/" language )))
- (makedir catalog-dir)
- (copyfiles
- (optional nofail)
- (source (cat "Catalogs/" language "/polyed.catalog"))
- (dest catalog-dir)
- )
- ))
- (set #from (cat "Doc/" language ".guide"))
- (if (exists #from)
- (copyfiles
- (optional nofail)
- (source #from)
- (dest (tackon target "Doc"))
- )
- )
- ))
- (set n (+ n 1))
- ))
-
- (complete 50)
-
- ;=============================================================================
- ; copy Macros and ARexx
- (working "Installing Macros and Arexx scripts")
- (copyfiles
- (source "Macros")
- (dest (tackon target "Macros"))
- (optional nofail)
- (pattern "~#?.info")
- )
- (complete 60)
-
- (copyfiles
- (source "Rexx")
- (dest (tackon target "Rexx"))
- (optional nofail)
- (pattern "~#?.info")
- )
- (complete 70)
-
- ;=============================================================================
- ; copy Icons
-
- (if @pretend
- (working #pretend-iconcopy)
- (
- (working "Installing icons")
- (if (= iconset 0)
- (set iconsource "Icons/Standard")
- (set iconsource "Icons/MagicWB")
- )
-
- ; PolyEd Drawer
-
- (copyfiles (source (cat iconsource ".info"))
- (dest supertarget)
- (newname "PolyEd.info")
- (infos)
- (nogauge)
- )
-
- ; Main Program and Subdrawers
-
- (set n 0)
- (while (set from (select n "PEd.info" "Read.Me.info" "Doc.info" "Macros.info" "Rexx.info" "Icons.info" ""))
- (copyfiles (source (tackon iconsource from))
- (dest target)
- (infos)
- (nogauge)
- )
- (set n (+ n 1))
- )
-
- ; Docs
- (set destdir (tackon target "Doc"))
- (foreach destdir "#?.guide"
- (
- (copyfiles (source (tackon iconsource "def_guide.info"))
- (dest destdir)
- (newname (cat @each-name ".info"))
- (infos)
- (nogauge)
- )
- ))
- (foreach destdir "#?.doc"
- (
- (copyfiles (source (tackon iconsource "def_doc.info"))
- (dest destdir)
- (newname (cat @each-name ".info"))
- (infos)
- (nogauge)
- )
- ))
-
- ; Rexx
- (set destdir (tackon target "Rexx"))
- (foreach destdir "#?.rexx"
- (
- (copyfiles (source (tackon iconsource "def_rexx.info"))
- (dest destdir)
- (newname (cat @each-name ".info"))
- (infos)
- (nogauge)
- )
- ))
-
- ; Macros
- (set destdir (tackon target "Macros"))
- (foreach destdir "#?.ped"
- (
- (copyfiles (source (tackon iconsource "def_ped.info"))
- (dest destdir)
- (newname (cat @each-name ".info"))
- (infos)
- (nogauge)
- )
- ))
-
- ;------------------------------------------------------------
- ; Copy only icons of selected set
- ; FIXME: Should make an option to install icons only...
- ;------------------------------------------------------------
-
- (copyfiles (source iconsource)
- (dest (tackon target "Icons"))
- (infos)
- (optional nofail)
- (pattern "def_#?.info")
- (nogauge)
- )
- ))
-
- (complete 90)
-
- ;------------------------------------------------------------
- ; Copy keyfile for registrated users
- ;------------------------------------------------------------
-
- (if (exists "ped.key")
- (copyfiles (source "ped.key")
- (dest target)
- (optional nofail)
- (infos)
- (help @copyfiles-help)
- )
- )
-
- ;=============================================================================
- ; Make user-startup entries
-
- (startup "PolyEd"
- (prompt "Some instructions need to be added to the \"S:user-startup\" so that your system will be properly configured to use PolyEd.")
- (help #startup-help)
- (command (cat "assign >NIL: PED: " target "\n"))
- (command "path >NIL: PED: add")
- )
-
- (complete 100)
-